package kr.couponplay.android.activity.deal.category;

import java.util.List;

import kr.couponplay.android.AppContext;
import kr.couponplay.android.Category;
import kr.couponplay.android.activity.deal.menu.TopMenuHelper;

public class CategoryHelper {
	public static int mainCategoryId;
	public static int subCategoryId;

	public static void draw(CategoryAdapter categoryAdapter, int position) {
		categoryAdapter.clear();
		Category mainCategory = TopMenuHelper.topMenuButtons.get(position).getCategory();
		categoryAdapter.add(mainCategory);
		
		List<Category> subCategories = AppContext.getSubCategories(categoryAdapter.getContext()).get(mainCategory.getId());
		for (Category subCategory : subCategories) {
			categoryAdapter.add(subCategory);
		}
	}
}
